package com.qcby.llmtchstd.controller;

import com.qcby.llmtchstd.common.ResponseResult;
import com.qcby.llmtchstd.entity.Admin;
import com.qcby.llmtchstd.entity.User;
import com.qcby.llmtchstd.service.AdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@Controller
@RequestMapping(value = "/admin")
@Api(tags = "管理员管理")
public class AdminController {
    @Autowired
    private AdminService adminService;

    @RequestMapping(value = "/login",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("管理员登录" )
    public ResponseResult managerSearch(@RequestBody Admin admin){
        return adminService.login(admin);
    }
    @GetMapping("/adminCurrent")
    public ResponseResult<Admin> teacherCurrent() {

        return ResponseResult.success("查询成功", null);
    }


}
